import request from "@/utils/request"
/*/**
 * @description:菜单列表接口
 * @param {type} query:查询条件对象,current:当前页码,size:展示几条数据
 * @return: promise
 */
export function ApiGetMenuList(query) {
  return request({
    url: `/system/menu/search`,
    method: 'post',
    data: query
  })
}
/*/**
 * @description: 新增菜单
 * @param {type} data:表单数据
 * @return: promise
 */
export function ApiAddMenu(data) {
  return request({
    url: `/system/menu`,
    method: 'post',
    data
  })
}
/*/**
 * @description: 查询菜单
 * @param {type} id:点击的id
 * @return: promise
 */
export function ApiGetById(id) {
  return request({
    url: `/system/menu/${id}`,
    method: 'get'
  })
}
/*/**
 * @description: 提交菜单
 * @param {type} data:表单数据
 * @return: promise
 */
export function ApiPutById(data) {
  return request({
    url: `/system/menu`,
    method: 'put',
    data
  })
}
/*/**
 * @description: 删除菜单
 * @param {type} id:点击的id
 * @return: promise
 */
export function ApiDeleteById(id) {
  return request({
    url: `/system/menu/${id}`,
    method: 'delete'
  })
}
